using System.Threading.Tasks;
using JlPay.Sdk.Core;
using JlPay.Sdk.Models.Trans.Union;

namespace JlPay.Sdk.Services.Trans.Union
{
    /// <summary>
    /// 银联JS支付服务
    /// </summary>
    public class UnionJsPayService : BaseService
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="config">配置对象</param>
        public UnionJsPayService(Config config) : base(config)
        {
        }

        /// <summary>
        /// 银联JS支付接口
        /// </summary>
        /// <param name="request">银联JS支付请求</param>
        /// <returns>银联JS支付响应</returns>
        public async Task<UnionJsPayResponse> UnionJsPayAsync(UnionJsPayRequest request)
        {
            return await PostAsync<UnionJsPayRequest, UnionJsPayResponse>(request, UnionJsPayRequest.API_URL);
        }
    }
} 